import https from "@/utils/http/http2";

export const addProductCategoryInfo = data => {
  return https({
    method: "post",
    url: `/dict`,
    data
  });
};
export const addSubProductCategoryInfo = data => {
  return https({
    method: "post",
    url: `/dict`,
    data
  });
};
export const getAllProductCategoryInfo = () => {
  return https({
    method: "get",
    url: "/dict/all"
  });
};
export const delSubProductCategoryInfo = id => {
  return https({
    method: "DELETE",
    url: `/dict/${id}`
  });
};
export const upDataSubProductCategoryInfo = data => {
  return https({
    method: "put",
    url: `/dict`,
    data
  });
};

export const upDataSubProductCategoryInfo1 = data => {
  return https.get("/dict", { params: data });
};

export const getDictByCode = code => {
  return https({
    method: "get",
    url: `/dict/${code}`
  });
};
